﻿<?php
$request=Zend_Controller_Front::getInstance()->getRequest();
$auth = Zend_Auth::getInstance();



$this->headMeta()->appendName('keywords', 'viriathus,telvent,datacenters,circuitos,mmr');
$this->headMeta()->appendName('author', 'Juan Manuel Martínez Carrillo');
$this->headMeta()->appendName('description', 'Sistema de Gestión de Infraestructuras Tecnológicas');
$this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');
$this->headLink()->headLink(array('rel' => 'favicon', 'href' => '/favicon.ico?q'));

$this->headLink()->appendStylesheet($this->baseUrl('css/reset.css?1'));
$this->headLink()->appendStylesheet($this->baseUrl('css/typography.css?1'));
//$this->headLink()->appendStylesheet($this->baseUrl('css/forms.css'));
$this->headLink()->appendStylesheet($this->baseUrl('css/zend.css?1'));
$this->headLink()->appendStylesheet($this->baseUrl('css/ui.daterangepicker.css'));
$this->headLink()->appendStylesheet($this->baseUrl('css/cupertino/jquery-ui-1.8.4.custom.css'));

$this->headLink()->appendStylesheet($this->baseUrl('css/layout_print.css'),'print');


$this->headScript()->offsetSetFile(1,$this->baseUrl('js/jquery-1.4.2.min.js'),'text/javascript');
$this->headScript()->offsetSetFile(2,$this->baseUrl('js/jquery-ui-1.8.4.custom.min.js'),'text/javascript');
$this->headScript()->offsetSetFile(3,$this->baseUrl('js/zend.js.php?locale='.LOCALE),'text/javascript');
$this->headScript()->offsetSetFile(4,$this->baseUrl('js/jquery.multiselect.min.js'),'text/javascript');
$this->headScript()->offsetSetFile(5,$this->baseUrl('js/jquery.tablesorter.min.js'),'text/javascript');
$this->headScript()->offsetSetFile(6,$this->baseUrl('js/jquery.tablesorter.widgets.js'),'text/javascript');

//$this->headScript()->appendFile(8,$this->baseUrl('js/daterangepicker.jQuery.js'),'text/javascript');
//$this->headScript()->appendFile(9,$this->baseUrl('js/jquery.MultiFile.pack.js'),'text/javascript');

?>
<html>
<head>
<!--wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
// Autor Juan Manuel Martínez Carrillo
// juamarca@gmail.com
// 2008-2011
// SGIT
// Sistema de Gestión de Infraestructuras Tecnológicas 
// Telvent Global Services
//wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww--> 

<?php
echo $this->headMeta().PHP_EOL;
echo $this->headTitle().PHP_EOL;
echo $this->headLink().PHP_EOL;
echo $this->headScript().PHP_EOL;
echo $this->headStyle().PHP_EOL;
?>




<script type="text/javascript">

var began_loading = (new Date()).getTime();
function done_loading() {
  end_loading = (new Date()).getTime();

  return Math.round( (end_loading - began_loading)/100)/10
}


<?php if($this->idZona): ?>
function irazona(idZona,id) {
    //coge query string y cambia idZona
    loc=location.href;
	zona="/idZona/"+idZona;
	nzona="/idZona/"+id;
	path=loc.split(zona).join(nzona);


    //crea un formulario que simula la recarga de la pagina en la nueva zona 
    var form = document.createElement("form");
    form.setAttribute("method", 'POST');
    form.setAttribute("action", path);

	

    <?php foreach($request->getPost() as $k => $v):?>
	    var hiddenField = document.createElement("input");
	    hiddenField.setAttribute("type", "hidden");
	    hiddenField.setAttribute("name", "<?php echo $k?>");
	    hiddenField.setAttribute("value","<?php echo $v?>");
	    form.appendChild(hiddenField);
    <?php endforeach;?>

    document.body.appendChild(form);
    form.submit();
}
<?php endif;?>

function testload(){
    time_load = done_loading();
    $('#tiempo_carga_js').after('<small> | Render: '+time_load+' seg</small>')
}

$(document).ready(function(){ 
	<?php echo $this->placeholder('onReady'); ?> 
	
    //$('#logohead').css('background-image','url("/fondologo.php?w='+screen.width+')")')
	
    $('#logoheadsrc').attr('src',"/fondologo.php?w="+screen.width);
})

</script>



</head>


<body onload="testload()">
	

<!--Barra superior-->
<div id="header">
	<div id="logohead"><img src="" id="logoheadsrc" width="100%"/></div>
	<div id="layoutdims">
            <p id="breadcrumbs">
               <span> <?php echo $this->navigation()->breadcrumbs()->render(); ?></span>
               <span id="select_dc"><?php echo $this->formchangeDC;?></span>
            </p>
	</div>
</div>



<!--Fin Barra superior-->

<div class="colmask fullpage">
    <div class="col1 ">
        <!-- Column 1 start -->
        <div class="noprint">
        <?php if($this->filtros) echo $this->filtros;?>
        </div>
        <div style="clear:both"></div>
        

        
        <?php  echo $this->layout()->content;?>
        <div style="height:50px"></div>
        <!-- Column 1 end -->
    </div>
    
    
    
</div>







    

    <div id="cometchat_base" class="ui-widget-header" >
        <?if($auth->hasIdentity()):?>
        
        <span class="cometchat_tab" id="mis_asuntos">
            <span style="float: left;">
              <a style="cursor: pointer;color:#213d5b"><span class="ui-icon ui-icon-calendar"  style="float: left;margin-right:2px;"></span>Mis Tareas</a>
              <!--<div style="top: -5px; display: block;" class="cometchat_tabalert"><?php echo $this->asuntos?></div>-->
            </span>
        </span>
    
  
        <span class="cometchat_tab" id="cometchat_userstab"  style="width:330px">
            <span style="float: left;">
              <a style="color:#213d5b"><span class="ui-icon ui-icon-clock"  style="float: left;margin-right:2px;"></span>
              <span id="tiempo_carga"><?php echo $this->timeServer?></span><span id="tiempo_carga_js"></span>
              </a>
              
            </span>
        </span>
    
      <span class="cometchat_tab " class="" style="width:60px;float:right">
          
      	
      	 <a href="<?echo $this->baseUrl('login/logout')?>" style="color:#213d5b"> <span class="ui-icon ui-icon-power"  style="float: left;padding-right:4px;"></span>
            <span class="cometchat_userstab_text" style="float: left;">Salir</span></a>
        </span>
        
        
        <span class="cometchat_tab"  style="width:100px;float:right">
            <a  style="color:#213d5b"><span class="cometchat_userstab_text" style="float: left;"><?=$this->fecha_footer?></span></a>
        </span>
       
  
        <span class="cometchat_tab"  style="width:80px;float:right">
          <a  style="color:#213d5b" href="javascript:verAccesos('<?php echo $this->controllerName?>','<?php echo $this->idZona?>')"><span class="ui-icon ui-icon-key"  style="float: left;padding-right:4px;"></span>
          <span class="cometchat_userstab_text" style="float: left;">Accesos</span></a>
        </span>
        <!--
        <span  class="cometchat_tab" style="width:80px;float:right">
           <a  style="color:#213d5b" href="<?php echo $this->baseUrl('bitacora/index')?>"> <span class="ui-icon ui-icon-calendar"  style="float: left;padding-right:4px;"></span>
            <span class="" style="float: left;">Bitacora</span></a>
        </span>
        -->
        <span class="cometchat_tab user_tab" class="cometchat_userstab" style="width:200px;float:right">
          <a  style="color:#213d5b" href="javascript:changePersonal()"><span class="ui-icon ui-icon-person"  style="float: left;padding-right:4px;" title="<?php echo $this->escape($auth->getIdentity()->nombre);?>"></span>
            <span class="cometchat_userstab_text" style="float: left;"><?php echo substr($this->escape($auth->getIdentity()->nombre),0,28);?></span></a>
        </span>
        <!--
        <span class="cometchat_tab" style="width:105px;float:right" >
           <div id="slidertext" style="margin-top:-1px" class="ui-state-highlight"></div>
        </span>
        -->
        <?endif?>
   
    </div>

<div id="pie_pagina">
    <div style="height:250px;"></div>


</div>

<!--Ventanas modales estan hidden por defecto-->

<div  id="caja_mis_asuntos" style="z-index: 10;display:none;position:fixed;bottom:26px;width: 400px;max-height:400px;overflow:auto;" class="ui-state-highlight ui-corner-top">
  
  <div class="ui-widget-header ui-corner-all">Tareas Pendientes</div>
  <div id="asunt"></div>
  <a class="button_ira" href="/index.php?modulo=Task" style="float: right;">Gestionar Tareas</a>
</div>

<div id="dialog" title="Cargando..."></div>		
        
<div id="dialog-confirm" title="¿Seguro que desea Borrar?">
    <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Este item sera borrado permanentemente y no se podra recuperar. ¿Estas seguro?</p>
</div>
        
<div id="alertas" title="Atención">
    <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><span id="msg12345"></span></p>
</div>
<!--Fin ventanas modales-->



</body>     
</html>     
  
  
  